#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int x1, x2, x3, x4, x5;
	int y1, y2, y3, y4, y5;
	cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5;
	int ans = x1 * y5 - x5 * y1 + x2 * y1 - x1 * y2 + x3 * y2 - x2 * y3 + 
		x4 * y3 - x3 * y4 + x5 * y4 - x4 * y5;
	cout << abs(ans) << endl;
	return 0;
}